package com.example;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;


@Component
//@ConfigurationProperties(prefix="mybean")
public class MyBean {
	//@Id
    public String id;

    @Value("nihao")
    public String name;
    public String url;

    public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public MyBean() {}

    public MyBean(String firstName, String lastName) {
        this.name = firstName;
        this.name = lastName;
    }

    @Override
    public String toString() {
        return String.format(
                "MyBean[id=%s, firstName='%s', lastName='%s']",
                id, name, name);
    }
}
